setup database and added controllers