remove sprintf and pass to macro