refactor detail of activity