read ui and model