move learning back to the end