refactor activities