walking through functions scopes and such