Thanks everyone for helping refactor :)