added subscription code; fixed tests for Spec.js