before the cleanup