working version on wpf