deal with several possible data inputs