new version implemented, better step sequence, but not finished yet