start of Beamforming_points function