added head check