making more robust, more null checking, etc.