model and view optimization