minor fixes
added global declaration
initial commit