Corrected a little bit  function calculates Bettas - from now it doesn't
calculate betta in left and right boundaries, also i a trying to avoid
using variable 'h'.