made some modifications