nil return fixed, thousands refactored