implementing entity marshalling for params