cleaned up setParts a little... seems redundant to perform the same check twice