shape detection working