Changed Serializable interface

Changed it to return object as well as setting the current one’s
attributes