working version of simple model