can handle more formats in input