merged Derek's code(Profile activities)