converts string to int