Added metadata load function