adding serialization api (restfull)