Base of calculation script