working program.cs

used ref instead of out parameter