added class/module pattern and specs