cleaned up utility
big refactor