cleaned up and added rspecs