destroy listener implemented. rectangle parameter added for draw listener