work on core loop