it's better to declare typedef as close as possible to the usage