minor tweaks and can_convert function