refactoring; added third option