Clockwork Maze

Can you rotate the cog, light up the gears, and get the balls out of the maze? It's not as easy as you think.