implemented teacher view