added binary-related functions