comprehensive modification by myself