beginning of restructuring/metaprogramming. so broken