move types implementation to .cpp