Issue was with initalization and iterations