use local for function exists