opt type conversion but less flexible