generic piece class