added console debugging, token and poly class