changed api a little to return a list