Refactor a new better version