Added logic into extension