second leg part implementation