returning None instead of 0