generating moves works fine - weight not so
better debugging and indenting, fixed a bug