fxing the code