added the elementary calculations