parse arguments for main methods