swap usage and main fucntion