Changed code back and added a global call