start of code overhaul