refactor piece classes