Updated based on @unscriptable's feedback