add default parameter to allow query by name and id
add test code