changed form detection to parents method