added loc check