adding array pivot problem