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