Placed the GrabTag function in better location