fixed bug in iteration part