updated main which reads in byte array

let me know if this works for you guys