setting activity and setting functions implemented in a example