Implementation of order book in scala