edit settings page logic