changed string comparison to number comparison