moved ServiceStub to servicestub.js