major function completed