corrected for USE_BACKGROUND in training