added functions to detect circles