Code is duplicated above, I smell a refactor in here :D