code for setting account status