change API for directive