to bytes method and complex from method added