solving some puzzles