added method to check student code matches type of reference code