more defenzive code