first implementation of controller and frame