split initialization and alter loops