added binary() and hash() functions