Bounding the Cebysev functional for the Riemann-Stieltjes integral via a Beesack inequality and applications