updated: updated main method to copy over random states and messages.