enhanced converting of types