db token generation is improved