clean up
implemented for django wsgi application