new avalfunction