implemented varying colours and code cleanup