cleaning up core