added method for getting metadata