refactoring + adding phpspec