add better getting of meta data (less buggy)