add shell script for training; compilable; ready for debugging