added dynamic variable declaration