refactor fortune command