fixed all the typing errors, finally