add model independent code