fix the rest of the code