Returns result as return value instead of out parameter