changed input params type to typedef