add some prototypes for swap functions