you need to take care of error handling here to avoid a notice on invalid access