major function completed.