speed up semantic mapping and new method to do higher order training