pretty sure once this function starts executing lines 30 and 31 will always execute one after the other