wrote fuction contents.