edited to start support for chrome packaged app