added set minimum selection feature, removed basic XCode 5 warning with type cast