function [a, b] = swap(a, b)
% swap input parameters
    temp = a; a = b; b = temp;
end