changed to modular and Fixed #9