finish the code