edited controllers for readability