puzzle game: optimize