backend unit tests

write unit tests for backend functions

Edited by Caleb Woodbine