added getFirstParentWithClass