added unit testing with QUnit