decide what type of input we are dealing with