remake of SharpSerializer