Finished refactoring for multiple specs, input parameter