move spec into code modules