refactored without Maybe