change the input parameter from struct to signle type.