refactor of epup building tool