added shape serialization