convert to int selectively