doing setting logic