updated to use local user variable