initial module, still need browser-based jasmine tests and backward compatibility