code for movie controller