tried to refactor, failed at that. tried to use real data, limited success. this commit sucks, fixpls