some modification in returnData 4 erlang