controller changed for better readability