protecting against wrong data format