finish up the buildApp function