added test case for sweep algorithm