major rewrite

no longer framework like. now its just a function