return proper type