move test to spec
refactor!