typos + variable constitution
add missing braces