added rounding functions, some tests