refactored default suggestions and added option for custom sorting function