Fixed ToByteArray
Created complexity variable