refactoring the functions for list and update the movies