update code for shiro