service script from X4, closes #4