Teacher backend

working teacher backend with some style changes