createDataPacket would be a better function name in my opinion.