optimized code and create a static var for nb quotes
added nbQuotes information
added benchmark code