adjusted typedefs and variable names