change method name + optimize if-condition