added controller and models and view and sql