get code from service