fixing token mehtod