system-status: refactored py code