finished prototype of backend untested