better fix for let assign order