added recoring & modified integration (commented out for now)