implemented basic API controllers and models