updating controller functions