finished refactor to pseudo classical style