some implementation of 8-puzzle