add level == 0 filter on function write