tiding up, cleaning the unused code