some big modifications