refactor code, moved logic to separated controllers
clean up