Add the function of detecting shapes.