Make the same code work 4 Apps & WebApps as well