test fix and refactored creation