more flexible integer conversion extension