rewriting movegenerator