add more specs, refactor