add utility ord() function