Corrected variable names to their values and changed recalculation of values

Signed-off-by: Hans-Jörg Merk <hans-joerg.merk@t-online.de>