refactor solved