fix errors and review