moved the spec tests directly into the implementation