fix all the code