start re-writing code