before iteration