return length
use List instead of Map for selection manager