Succesfully refactored