refactor how pants is executed