Refator map output API for clear