rewrite activity selection