cleaning and adding code