add unit test and update cleanup Task