made swap inline