engine, still messy

basic functionality