added changes by bblanchon