refactor + hisotry activity