* return -1 on bad input string