added controllers & some refactoring added TODO)) in code