inputs are 1-d as well