updating security context