massive refactoring stupidity + rebuild