Updated code to reflect global students variable