added controller functions