Added compareTo for Task class