use the defined function