corrected errors in the resindex calculation
Added status to the view output