idea instead of type switching