removed corner case errors in selects, and added documentation for selects, folds and filters