refactored
also changed