refactor of moviedata functions