Changed ceil to round as edge case tested showed wrong result