use methods instead of comparison