REWRITE EVERYTHING

new framework, rewrite