added visit check and roles