add function previous into account_period