Changed everything to work with binary data