started implementing swap