generalize input type