fixed some errors, but still not working