use more appropriate ruby methods