added the case for undefined