API for pieces