changed footer and fixed row counter