fix function def in regions