fix bug -> now working version