auto switch between operations by code format