added function to find up to two pyramidal components