move app load inside block