improved return codes