refactor some activities