simplification and remove of outdated code