Added teacher homework logic