accept inputs as lists too