added $app variable