only call methods when necessary