algorithm extends serializable allow for persistence