rearranged structure; add progress indicator