some bugs fixed. need to add tests/yaml and fix #checkmate?