added some modifications