added some null cases