function addition(sort by date)