Modify getToken() method