added typedefs and separeted tests