[COSM] replace function macro