fix bug basic working version