byte array conversion not working. need to improvise