some errors to be fixed