refactor youtube api tutorial