profile and cleanup