training part nearly done
performance added, several files modified