added new metadata object and study length counter