added support for type in orderHistory