Adjustments to selection algo and syntax fix