implement periodic cleanup
add doc