Added demension variable to make_model