refactor grunt