first attempt at multiloop