refactored specs
fix tests