more code to support trade window
lite refactoring och borjan pa test