change the default sortBy param and add params into function for getting activities from db