swaped some code