slight optimization on puzzlesolver, profiling info