change updatebookmark function to handle token better