cleaning up internals