java functions for intents