use Monad in toBinary