Refactor with Tomas