removed global varible
ass 3 done