refactoring shapefile class