add test cases. fix min bounds