moving retrieving of metadata on server side (in progress)