Improved model example
Link to code in github