fixes to calculation model

Signed-off-by: Francisco Salinas <fssaez@gmail.com>
Merge pull request #16 from fssaez/master

np