fixed linSearch to take Comparable + added testing code