implement setupApplication method