Global vars added
Code Updated