(REFACTOR) - more elegant ruby!