finished up main thm