additional hooks + cleanups