filled the tokens in and implemented extraction function