basic encode token