modified and optimized mastermetadata