implemented auto cleaning