add test and function file