tweaked printing and added learning output