additional logs and some array resetting