declare variable at start of block