fixed implicit variable declarations to run constructors properly