still have some errors will fix later