use listener instead of casting activity