Why don't you use string comparison operators, instead of making your own comparative functions by the way???