Added swap calculatio