Adding marshall and unmarshall for activities