reorganised code layout for run times canvas view