replaced calls to passing context with passing activity when appropriate