add scope and var declarations