horizontal & vertical index adding functions