Fixed Basic function and added Serializing