Added example model and fixed minor calculation bug