restructuring + initial hacking