added loc functions