script for rebuilding the service layer