fix bugs, improve specs
write test scenario generator