added intents and new permissions