moved helper methods for specs into module