updated logic for both undergrad and grad, updated error messages