allow y to be a list of lists