small initial refactor
cleaned up formatting