changed jc so that all methods are inside handletoken