initial version of controller