improve struct declaration and definition