fixed missing variable declarations