added AddLastRows function