updated implementation section