using array instead of scalar