add conditions for h