some minor erros have been fixed