removed inline from swap