added locals declaration on scope level