refactored and moved specs