fixing the code