fix query for accepted events
refactor onActivityResult logic for home