setting up applications and stages