Modified function return to be more pythonic (TUI-17)