now as function