refactoring responsive controller