added typedefs and climits