updated select and sort methods