improved circle detection