selectAll logic