improvements in model adapter