updated readme and removed global variables