with some modifications