Moved variable declaration to better place