finishing tying Application to main