added warning for size mismatch