forgot to add a check on line 382