Removed globals(still debugging)