refacting
implementing 5