added piece functionality
added piece functionality