more spec
move spec file
more tests and fault tolerance