implemented dispose/cleanup behaviour