added preliminary structural detection