added kernel for binary mode