some changes to allow both recovery and learning running at the same time