still trying to get this to work in binary mode