removed comments and old regarding global variables