added switching sides