added polyshapes back and change space replace with regex