previous version was erroneously setting zeros to None