recognize shapes and store the type in the header