some unit tests added for piece generation