cleans data and delets the extra data