implemented new method (more realistic) for obtaining output from teacher, still some debug code is present