crap copypasta code
always sanity check