reorganize implementation section