swap returns and generic function description