added more units test, rewriting tets for controller