make string to binary conversion function public