Fix: made piece size dynamic