bug fixed with exchange
refactroing