improve code and add my* controller code