optimize for OSX; adjust model framework